using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace FytSoa.Domain.Cm;

/// <summary>
/// 社区-勋章用户获得
/// </summary>
[SugarTable("cm_medal_user")]
public class CmMedalUser:Entity
{
    /// <summary>
    /// 用户编号
    /// </summary>
    [Required]
    public long UserId { get; set; }

    /// <summary>
    /// 勋章编号
    /// </summary>
    [Required]
    public long MedalId { get; set; }
    
    /// <summary>
    /// 勋章
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(MedalId))]
    public CmMedal Medal { get; set; }

    /// <summary>
    /// 是否佩戴
    /// </summary>
    [Required]
    public bool IsWear { get; set; } = false;
    
    /// <summary>
    /// 是否领取
    /// </summary>
    [Required]
    public bool IsNeck { get; set; } = false;

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; }


}